{extend name="adminheader:header"/}
{block name="content"}
<style type="text/css">
    thead tr th{
        text-align: center;
    }
    tbody tr td{
        text-align: center;
    }
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>会员列表</h5>
                    </div>
                    <div class="ibox-content">
                        <form action="{:url('/admin/User/index')}" method="post" role="form" class="form-inline" style="padding-bottom:30px;">
                            会员类型:
                            <select class="form-control" name="u_type">
                                <option value="">全部</option>
                                <option value="1" {if condition="$u_type eq 1"}selected{/if}>普通会员</option>
                                <option value="2" {if condition="$u_type eq 2"}selected{/if}>专柜会员</option>
                                <option value="3" {if condition="$u_type eq 3"}selected{/if}>合伙人</option>
                            </select>&nbsp;&nbsp;
                            会员姓名: <input type="text" name="u_name" value="{$u_name|default=''}" placeholder="请输入会员姓名" style="width:150px;" class="form-control" />&nbsp;&nbsp;
                            身份证号: <input type="text" name="u_card" value="{$u_card|default=''}" placeholder="请输入身份证号" style="width:200px;" class="form-control" />&nbsp;&nbsp;
                            手机号码: <input type="text" name="u_tel" value="{$u_tel|default=''}" placeholder="请输入手机号码" style="width:150px;" class="form-control" />&nbsp;&nbsp;
                            店铺名称: <input type="text" name="u_store" value="{$u_store|default=''}" placeholder="请输入店铺名称" style="width:200px;" class="form-control" />&nbsp;&nbsp;
                            店铺地址: <input type="text" name="keyword" value="{$keyword|default=''}" placeholder="请输入店铺地址" style="width:200px;" class="form-control" />&nbsp;&nbsp;
                            <input type="submit" class="btn btn-success" value="搜索" style="margin-bottom: 0;"/>
                            <a class="btn btn-danger" href="{:url('/admin/User/index')}">清空</a>
                        </form>
                        <div class="table-responsive">
                            <table class="table table-striped table-hover ">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>推荐id</th>
                                        <th>会员类型</th>
                                        <th>会员姓名</th>
                                        <th>会员身份证号</th>
                                        <th>手机号码</th>
                                        <th>店铺名称</th>
                                        <th>店铺地址</th>
                                        <th>照片</th>
                                        <th>钱包</th>
                                        <th>注册时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                {if condition="$list neq null"}
                                    {volist name="list" id="vo"}
                                        <tr>
                                            <td>{$vo.id}</td> 
                                            <td>{$vo.recom_id}</td>
                                            {if condition="$vo.u_type eq 1"}
                                                <td>普通会员</td>
                                            {elseif condition="$vo.u_type eq 2"/}
                                                <td style="color: #0000FF;">专柜会员</td>
                                            {elseif condition="$vo.u_type eq 3"/}
                                                <td style="color: #B00000;">合伙人</td>
                                            {/if}
                                            <td>{$vo.u_name}</td>
                                            <td>{$vo.u_card}</td>
                                            <td>{$vo.u_tel}</td>
                                            <td>{$vo.u_store}</td>
                                            <td>{$vo.u_address}</td> 
                                            <td><img src="{:getPreviewUrl($vo.u_license)}" width="50" height="50"  onclick="imagePreviewDialog(this.src);" style="cursor: pointer;"/></td>
                                            <td>{$vo.u_wallet}元</td>
                                            <td>{:date('Y-m-d H:i',$vo['registr_time'])}</td>
                                            <td>
                                                <a href="{:url('/admin/User/indexAddress',array('id'=>$vo['id']))}" class="btn btn-success">收货地址</a>
                                                <a href="{:url('/admin/User/edit',array('id'=>$vo['id']))}" class="btn btn-primary">编辑</a>
                                                <a href="{:url('/admin/User/delete',array('id'=>$vo['id']))}" class="btn btn-danger js-ajax-delete">删除</a>
                                            </td>
                                        </tr>
                                    {/volist}
                                {else/}
                                    <tr>
                                        <td style="font-size:20px;text-align:center">暂无数据</td>
                                    </tr>
                                {/if}
                                </tbody>
                            </table>
                            <div class="text-left pages">
                                {$page}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="/admin/js/admin.js"></script>
{/block}